function [at, bt] = CalculateAtBt(det, alpha, delta)

ah1 = det.ah(1);  bh1 = det.bh(1);
ah2 = det.ah(2);  bh2 = det.bh(2);
ah3 = det.ah(3);  bh3 = det.bh(3);
ah4 = det.ah(4);  bh4 = det.bh(4);
ah5 = det.ah(5);

sin1delta	= sin(delta);
cos1delta	= cos(delta);
sin2delta	= 2 * sin1delta .* cos1delta;
cos2delta	= (cos1delta .* cos1delta) - (sin1delta .* sin1delta);

%-- coefficients for a(t) 
a1 = ah1 * ( 3. - cos2delta );
a2 = ah2 * ( 3. - cos2delta );
a3 = ah3 * sin2delta;
a4 = ah4 * sin2delta;
a5 = ah5 * cos1delta .* cos1delta;

%-- coefficients for b(t)
b1 = bh1 * sin1delta;
b2 = bh2 * sin1delta;
b3 = bh3 * cos1delta;
b4 = bh4 * cos1delta;

% Compute a(t) and b(t)
ah = alpha - det.lmst;

sin1ah	= sin(ah);
cos1ah	= cos(ah);
sin2ah	= 2 * sin1ah .* cos1ah;
cos2ah	= (cos1ah .* cos1ah) - (sin1ah .* sin1ah);

at = (a1 .* cos2ah) + (a2 .* sin2ah) + (a3 .* cos1ah) + (a4 .* sin1ah) + a5;
bt = (b1 .* cos2ah) + (b2 .* sin2ah) + (b3 .* cos1ah) + (b4 .* sin1ah);


